<template>
  <div class="header">
    <div class="bg"></div>
    <div class="title cards" style="background-color: white">
      <img style="border-radius: 50%; height: 80px" src="http://q.qlogo.cn/g?b=qq&nk=1220998011&s=160" alt="" />
      <div style="height: 50px; padding-left: 10px; width: 100%; display: flex; flex-direction: row; align-items: center; justify-content: space-between">
        <div>
          <h3>{{ info.username }}</h3>
          <p style="font-size: 13px; color: rgb(0, 0, 0, 0.6); line-height: 23px">{{ info.phone }}</p>
        </div>
        <div>
          <i class="el-icon-arrow-right"></i>
        </div>
      </div>
    </div>
  </div>
  <el-main class="bg-purple-light" style="padding-top: 0px">
    <div class="status cards">
      <div style="display: flex; flex-derction: row; justify-content: space-between; margin: 0px 5px 10px 5px; height: 25px; line-height: 25px">
        <h4>我的订单</h4>
        <span style="font-size: 13px">查看所有订单></span>
      </div>
      <ul>
        <el-badge :value="info.order.WaitingPayment" type="danger">
          <li>
            <i class="el-icon-bank-card"></i>
            <div>待付款</div>
          </li>
        </el-badge>
        <el-badge :value="info.order.WaitingSend" type="danger">
          <li>
            <i class="el-icon-box"></i>
            <div>待发货</div>
          </li>
        </el-badge>
        <el-badge :value="info.order.WaitingReceived" type="danger">
          <li>
            <i class="el-icon-truck"></i>
            <div>待收货</div>
          </li>
        </el-badge>
        <el-badge :value="info.order.WaitingComment" type="danger">
          <li>
            <i class="el-icon-chat-dot-square"></i>
            <div>待评价</div>
          </li>
        </el-badge>
        <el-badge :value="info.order.WaitingAfterSales" type="danger">
          <li>
            <i class="el-icon-news"></i>
            <div>售后</div>
          </li>
        </el-badge>
      </ul>
    </div>
    <div class="tool cards">
      <el-row>
        <el-col :span="6">
          <i class="el-icon-star-off"></i>
          <div>我的收藏</div>
        </el-col>
        <el-col :span="6">
          <i class="el-icon-s-ticket"></i>
          <div>优惠券</div>
        </el-col>
        <el-col :span="6">
          <i class="el-icon-medal"></i>
          <div>会员中心</div>
        </el-col>
        <el-col :span="6">
          <i class="el-icon-headset"></i>
          <div>客户服务</div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="6">
          <i class="el-icon-location-outline"></i>
          <div>地址管理</div>
        </el-col>
        <el-col :span="6">
          <i class="el-icon-chat-line-square"></i>
          <div>达人问答</div>
        </el-col>
        <el-col :span="6">
          <i class="el-icon-present"></i>
          <div>0元抽奖</div>
        </el-col>
        <el-col :span="6">
          <i class="el-icon-more"></i>
          <div>更多</div>
        </el-col>
      </el-row>
    </div>
  </el-main>
</template>

<script setup>
import { reactive, ref } from 'vue'
let info = reactive({
  username: '后知后觉',
  phone: '153****0726',
  avatar: 'http://q.qlogo.cn/g?b=qq&nk=1220998011&s=160',
  order: {
    WaitingPayment: null,
    WaitingSend: 2,
    WaitingReceived: 3,
    WaitingComment: null,
    WaitingAfterSales: null
  }
})
</script>

<style lang='less' scoped>
.cards {
  background-color: white;
  border-radius: 5px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}
.header {
  width: 100%;
  height: 11rem;
  overflow: hidden;
  position: relative;
  background-color: #e5e9f2;
  .bg {
    // background-image: linear-gradient(0deg, #57f2ea 0%, #57E9F2 48%, #45D4FB 100%);
    background-image: linear-gradient(0deg, #57e9f2, #45d4fb 50%);
    // background-image: linear-gradient(0deg, #f1503b, #c82519 50%);
    position: absolute;
    top: 0;
    left: -15%;
    height: 7rem;
    width: 130%;
    border-bottom-left-radius: 100%;
    border-bottom-right-radius: 100%;
  }
  .title {
    position: relative;
    top: 20px;
    margin: 10px 15px;
    height: 110px;
    padding: 10px 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
  }
}
.status {
  padding: 10px 5px;
  ul {
    list-style: none;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    li {
      text-align: center;
      i {
        font-size: 25px;
      }
      div {
        font-size: 13px;
      }
    }
  }
}
/deep/.el-badge__content {
  top: 3px !important;
  right: 15px !important;
}
/deep/sup {
  border: 1.5px solid #f56c6c;
  color: #f56c6c;
  background-color: white;
  font-size: 6px;
}
/deep/.el-badge__content {
  font-size: 12px;
  height: 15px;
  line-height: 15px;
  padding: 0 5px;
}
.tool {
  margin-top: 10px;
  padding: 5px 10px;
  text-align: center;
  font-size: 14px;

  .el-col {
    padding: 5px 0;
    i {
      background-color: #f1f1f1;
      padding: 8px;
      border-radius: 50%;
      font-size: 20px;
    }
  }
}
</style>
